package ar.edu.unsam.algo3.plantasvszombies.wicket;

import ar.edu.unsam.algo3.plantasvszombies.ui.ApplicationModels.JardinAppModel;
import ar.edu.unsam.algo3.plantasvszombies.wicket.AlmanaqueZombiePage;
import ar.edu.unsam.algo3.plantasvszombies.wicket.JardinPage;
import ar.edu.unsam.algo3.plantasvszombies.wicket.JardinZenPage;
import org.apache.wicket.markup.html.panel.Panel;
import org.eclipse.xtext.xbase.lib.Extension;
import org.eclipse.xtext.xbase.lib.Functions.Function0;
import org.eclipse.xtext.xbase.lib.ObjectExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure0;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.uqbar.wicket.xtend.WicketExtensionFactoryMethods;
import org.uqbar.wicket.xtend.XLink;

@SuppressWarnings("all")
public class MenuNavegacionPanel extends Panel {
  @Extension
  private WicketExtensionFactoryMethods _wicketExtensionFactoryMethods = new Function0<WicketExtensionFactoryMethods>() {
    public WicketExtensionFactoryMethods apply() {
      WicketExtensionFactoryMethods _wicketExtensionFactoryMethods = new WicketExtensionFactoryMethods();
      return _wicketExtensionFactoryMethods;
    }
  }.apply();
  
  public MenuNavegacionPanel(final JardinAppModel jardinApp) {
    super("menuNavegacion");
    XLink<Object> _xLink = new XLink<Object>("jardin");
    final Procedure1<XLink<Object>> _function = new Procedure1<XLink<Object>>() {
      public void apply(final XLink<Object> it) {
        final Procedure0 _function = new Procedure0() {
          public void apply() {
            JardinPage _jardinPage = new JardinPage(jardinApp);
            it.setResponsePage(_jardinPage);
          }
        };
        it.setOnClick(_function);
      }
    };
    XLink<Object> _doubleArrow = ObjectExtensions.<XLink<Object>>operator_doubleArrow(_xLink, _function);
    this._wicketExtensionFactoryMethods.addChild(this, _doubleArrow);
    XLink<Object> _xLink_1 = new XLink<Object>("almanaque");
    final Procedure1<XLink<Object>> _function_1 = new Procedure1<XLink<Object>>() {
      public void apply(final XLink<Object> it) {
        final Procedure0 _function = new Procedure0() {
          public void apply() {
            AlmanaqueZombiePage _almanaqueZombiePage = new AlmanaqueZombiePage(jardinApp);
            it.setResponsePage(_almanaqueZombiePage);
          }
        };
        it.setOnClick(_function);
      }
    };
    XLink<Object> _doubleArrow_1 = ObjectExtensions.<XLink<Object>>operator_doubleArrow(_xLink_1, _function_1);
    this._wicketExtensionFactoryMethods.addChild(this, _doubleArrow_1);
    XLink<Object> _xLink_2 = new XLink<Object>("btnJardinZen");
    final Procedure1<XLink<Object>> _function_2 = new Procedure1<XLink<Object>>() {
      public void apply(final XLink<Object> it) {
        final Procedure0 _function = new Procedure0() {
          public void apply() {
            JardinZenPage _jardinZenPage = new JardinZenPage(jardinApp);
            it.setResponsePage(_jardinZenPage);
          }
        };
        it.setOnClick(_function);
      }
    };
    XLink<Object> _doubleArrow_2 = ObjectExtensions.<XLink<Object>>operator_doubleArrow(_xLink_2, _function_2);
    this._wicketExtensionFactoryMethods.addChild(this, _doubleArrow_2);
  }
}
